package com.weijie.relaxed.net;


import org.json.JSONObject;

import com.android.volley.Response.ErrorListener;
import com.android.volley.VolleyError;

public abstract class JsonListener {

	public int what;
	public String fileName;

	public com.android.volley.Response.Listener<JSONObject> mListener = new com.android.volley.Response.Listener<JSONObject>() {
		@Override
		public void onResponse(JSONObject response) {
			JsonListener.this.onResponse(response);
		}
	};

	public ErrorListener mErrorListener = new ErrorListener() {
		@Override
		public void onErrorResponse(VolleyError error) {
			error.printStackTrace();
			JsonListener.this.onErrorResponse(error);
		}
	};

	public abstract void onResponse(JSONObject response);

	public abstract void onErrorResponse(VolleyError error);
	
}
